home *** CD-ROM | disk | FTP | other *** search
- /**************************************************************************/
- /* DelBlock.ucwx */
- /* */
- /* Copyright ©1998 by Dick Whiting */
- /* */
- /*------------------------------------------------------------------------*/
- /* Deletes all from <TAG> thru </TAG>. */
- /* Place cursor in the TAG name portion and invoke the script. */
- /* See the UrbCedWWW Readme for a more complete description. */
- /**************************************************************************/
- /*
- $VER: 1.0 Copyright ©1998 by Dick Whiting
- */
-
- options results
- Address CYGNUSED
-
- startline=-1
- endline=-1
- startcol=-1
- endcol=-1
-
- 'CEDTOFRONT'
-
- starttag=1
-
- 'GETCHAR'
- char=result
-
- if char~='<' then do
- 'SEARCH FOR' '<' 0 0 0 0 1
- found=result
- if ~found then do
- 'OKAY1' 'Not part of a TAG?'
- exit
- end
- end
-
- 'RIGHT'
-
- 'GETCHAR'
- char=result
-
- if char='/' then do
- starttag=0
- 'STATUS CURSORLINE'
- endline=result+1
- 'STATUS CURSORCOLUMN'
- endcol=result
- 'RIGHT'
- end
- else do
- 'STATUS CURSORLINE'
- startline=result+1
- 'STATUS CURSORCOLUMN'
- startcol=result
- end
- 'GETWORD'
- tag=strip(result)
-
- if starttag then do
- 'SEARCH FOR' '</'tag'>' 1 0 1 0 0 0 0 0 1
- found=result
- if found then do
- 'STATUS CURSORLINE'
- endline=result+1
- 'STATUS CURSORCOLUMN'
- endcol=result+1
- end
- end
- else do
- 'SEARCH FOR' '<'tag'>' 1 0 0 0 1
- found=result
- if ~found then 'SEARCH FOR' '<'tag' ' 1 0 0 0 1
- found=result
- if found then do
- 'STATUS CURSORLINE'
- startline=result+1
- 'STATUS CURSORCOLUMN'
- startcol=result+1
- end
- end
-
- if startline>-1 then do
- 'LL' startline startcol
- 'MARK'
- on=result
- if ~on then 'MARK'
- 'FIND MATCHING BRACKET'
- 'RIGHT'
- if endline>-1 then do
- 'LL' endline endcol
- 'FIND MATCHING BRACKET'
- 'RIGHT'
- end
- 'CUT'
- end
- else do
- if endline>-1 then do
- 'LL' endline endcol
- 'FIND MATCHING BRACKET'
- 'RIGHT'
- 'MARK'
- on=result
- if ~on then 'MARK'
- 'CUT'
- end
- end
-
- exit
-
-
-